﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;

namespace ArgusLib.Fractals.OrbitFractals
{
	public class Tricorn : MandelbrotSetBase
	{
		public Parameter Parameter { get; set; }

		public Tricorn(Parameter parameter)
			: base(parameter)
		{
		}

		protected override IParameterIterations Parameter_get()
		{
			return this.Parameter;
		}

		protected override void Parameter_set(IParameter value)
		{
			base.Parameter_set(value);
			if (!(value is Parameter))
				throw new ArgumentException();
			this.Parameter = (Parameter)value;
		}

		protected override Complex IterationFormula(Complex z, Complex c)
		{
			Complex z1 = Complex.Conjugate(z);
			return z1 * z1 + c;
		}
	}
}
